-
Notifications
You must be signed in to change notification settings - Fork 619
[SDK] Add tests for chain utils #5280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Your org has enabled the Graphite merge queue for merging into mainAdd the label “merge-queue” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix. You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link. |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
size-limit report 📦
|
gregfromstl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, tests are just failing
Merge activity
|
2f5b66f to
d014c1b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5280 +/- ##
==========================================
+ Coverage 45.47% 45.55% +0.08%
==========================================
Files 1067 1068 +1
Lines 55486 55514 +28
Branches 4013 4029 +16
==========================================
+ Hits 25230 25292 +62
+ Misses 29565 29532 -33
+ Partials 691 690 -1
*This pull request uses carry forward flags. Click here to find out more.
|
## Problem solved
Short description of the bug fixed or feature added
<!-- start pr-codex -->
---
## PR-Codex overview
This PR enhances the `CUSTOM_CHAIN_MAP` and `convertLegacyChain` function to be exported for testing purposes. It also adds new tests for chain handling, including legacy chain conversion and caching functionality.
### Detailed summary
- Exported `CUSTOM_CHAIN_MAP` for testing.
- Exported `convertLegacyChain` function.
- Added a `legacyChain` object for testing.
- Created tests for:
- `getChainSymbol`
- `getChainDecimals`
- `getChainNativeCurrencyName`
- `convertLegacyChain`
- `defineChain` with a legacy chain.
- Caching functionality with `cacheChains`.
> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}`
<!-- end pr-codex -->
d014c1b to
c63fefd
Compare

Problem solved
Short description of the bug fixed or feature added
PR-Codex overview
This PR focuses on enhancing the
CUSTOM_CHAIN_MAPandconvertLegacyChainfunctionalities, making them exportable for testing. It also adds new test cases to validate chain properties and conversions.Detailed summary
CUSTOM_CHAIN_MAPto be exported for testing.convertLegacyChainfunction for internal use.legacyChainobject representing Ethereum Mainnet.CUSTOM_CHAIN_MAP.